package io.renren.modules.jxgkquestion.dao;

import io.renren.modules.jxgkquestion.entity.ScoreRankEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface ScoreRankDao {
    @Select("Select score_student_id,score_question_amount from score_question where score_subject_name=#{scoreSubjectName} order by  score_question_amount desc limit 10")
    List<ScoreRankEntity> findAmountRankBySubjectName(String scoreSubjectName);
    @Select("Select score_student_id,score_question_rate from score_question where score_subject_name=#{scoreSubjectName} order by  score_question_rate desc limit 10")
    List<ScoreRankEntity> findRateRankBySubjectName(String scoreSubjectName);

}
